import {request} from "../utils/request";


// 用户下单查询所有优惠券
export async function getLiner() {
    const res = await request({
        url: `/order/findUserCoupon`,
        method: 'get',
    }).catch()
    return res
}

// 下单
export async function userLoader(data){
	const res = await request({
		url: `/order/xd`,
		method: `POST`,
		data
	}).catch()
	return res
}

// 查询用户订单列表
export async function getOrderList(data){
	const res = await request({
		url:"/order/loadUser",
		method:"POST",
		data
	}).catch()
	return res
}

// 用户订单详情
export async function getOrderData(data){
	const res = await request({
		url:"/order/findPlayMan",
		method:"POST",
		data
	}).catch()
	return res
}

// 待付款重新提交付款
export async function reOrder(data){
	const res = await request({
		url :"/order/waitOrder",
		method:"POST",
		data
	}).catch()
	return res
}

// 加载更多
export async function getEveryOrder(data){
	const res = await request({
		url:"/order/loadMore",
		method:"POST",
		data
	}).catch()
	return res
}

// 用户删除订单
export async function delOrder(data){
	const res = await request({
		url:`/order/scOrder/${data}`,
		method:"DELETE",
	}).catch()
	return res
}

// 定位到达接口
export async function POSTionOrder(data){
	const res = await request({
		url:"/position",
		method:"POST",
		data
	}).catch()
	return res
}
// 微信提现
export async function withDrawals(data){
	const res = await request({
		url:`/cashout`,
		method:'POST',
		header:{
		    'content-type':'application/x-www-form-urlencoded'
		},
		data
	}).catch()
	return res
}
//帮组下单
export async function createOrder(data){
	const res = await request({
		url:"/order/xd",
		method:"POST",
		data
	}).catch()
	return res
}

// 判断是否能提现
export async function getCashOut(){
	const res = await request({
		url:"/function/cashout",
		method:"get",
	}).catch()
	return res
} 
